package com.zeta.api.client.system;

import com.zeta.api.model.UserInfoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 系统服务-用户 Feign接口
 *
 * @author gcc
 */
@FeignClient(name = "system-server", path = "system", fallbackFactory = IUserApiFallbackFactory.class)
public interface IUserApi {

    /**
     * 获取用户基础信息
     * @param id 用户id
     * @return UserInfoDTO
     */
    @GetMapping("/user/info/{id}")
    UserInfoDTO getUserInfoById(@PathVariable("id") Long id);

    /**
     * 批量获取用户基础信息
     * @param ids 用户id列表
     * @return List<UserInfoDTO>
     */
    @GetMapping("/user/info/batch")
    List<UserInfoDTO> getUserInfoByIds(@RequestParam("ids") List<Long> ids);
}
